#!/bin/bash
wget -r -A.pdf -o output.log -w 5 -e robots=off -nd http://energy.iiitd.edu.in/News 
fileno=`cat output.log|tail -1|awk '{print $2}'`
totalsize=`cat output.log|tail -1| awk '{print $4}'`
avgspeed=`cat output.log|tail -1|awk '{print $7 $8}'|sed -e 's/[()]//g'`
start=`cat output.log|head -1|awk '{print $2}'| sed -e 's/[--]//g'`
ip=`cat output.log|head -2|awk '{print $4}'`
end=`cat output.log|tail -3|head -1|awk '{print $3}'|sed -e 's/[--]//g'`
echo "No. of Files :" $fileno
echo "Total data downloaded :" $totalsize
echo "Average Speed :" $avgspeed
echo "IP address :" $ip "Start Time :" $start "End Time :"
